#lambda之计算两数之和
fn1=lambda a,b:a+b
print(fn1(12,23))
#lambda之无参数
fn2=lambda a : a
print(fn2('hello world'))
#lambda之默认参数
fn3=lambda a,b,c=100:a+b+c
print(fn3(12,23))
print(fn3(12,23,15))
#lambda之*args
fn4=lambda *args:args
print(fn4(1))
print(fn4(1,2,3))
print(fn4(1,2,3,4,5))
#lambda之**kwargs
fn5=lambda **kwargs:kwargs
print(fn5(name='tom'))
print(fn5(name='tom',age=18))
#lambda之带判断（三目运算符）
fn6=lambda a,b:a if a>b else b
print(fn6(100,20))